--- /dev/null
+-- Indexing MIME types
+--
+-- Allows MIME search to work on large databases like Wikimedia one
+
+ALTER TABLE /*$wgDBprefix*/image
+ ADD INDEX img_mime (img_major_mime, img_minor_mime);
INDEX img_size (img_size),
-- Used by Special:Newimages and Special:Imagelist
INDEX img_timestamp (img_timestamp),
+ -- Used in API and duplicate search
+ INDEX img_sha1 (img_sha1),
+ -- Used in MIME search
+ INDEX img_mime (img_major_mime, img_minor_mime)
- -- For future use
- INDEX img_sha1 (img_sha1)
) /*$wgDBTableOptions*/;
array( 'maybe_do_profiling_memory_update' ),
array( 'do_filearchive_indices_update' ),
array( 'update_password_format' ),
+ array( 'add_index', 'image', 'img_mime', 'patch-index-img_mime.sql' ),
);